package com.java;

import com.java.Impl.BuyStock;
import com.java.Impl.SellStock;
import com.java.borker.Broker;
import com.java.stock.Stock;

/**
 * Hello world!
 *
 */
public class CommadPatternDemo
{
    public static void main( String[] args )
    {
        Stock abcStock=new Stock();
        BuyStock buyStockOrder=new BuyStock(abcStock);
        SellStock sellStockOrder=new SellStock(abcStock);

        Broker broker=new Broker();
        broker.takeOrder(buyStockOrder);
        broker.takeOrder(sellStockOrder);

        broker.placeOrders();
    }
}
